package com.suzhuoke.ncpsy.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

/**
 * tb_tp
 * @author 
 */
@ApiModel("")
@TableName("tb_tp")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Tp extends Model<Tp> implements Serializable {

    private static final long serialVersionUID = 112121212L;
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /**
     * 溯源模板名称
     */
    @ApiModelProperty("溯源模板名称")
    private String tpName;
    @ApiModelProperty("溯源环节")
    @TableField(exist = false)
    private List<TpNode> nodeList;
    /**
     * 模板状态0正常1删除
     */
    @ApiModelProperty("模板状态0正常1已经使用2删除")
    private Integer state;
    @ApiModelProperty("type为0时为模板1时修改的")
    private Integer type;
    @ApiModelProperty("企业id")
    private String qyid;

    private Date createTime;

    private Date updateTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}